﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Rio.Manager.Application.ViewModel.FolderTypeAdministration;

namespace Rio.Manager.Application.Controls
{
    public partial class AddChildWorkflowChildWindow
    {
        /// <summary>
        /// Gets or sets the data context for a <see cref="T:System.Windows.FrameworkElement"/> when it participates in data binding.
        /// </summary>
        /// <value></value>
        /// <returns>The object to use as data context.</returns>
        public new NewWorkflowTabViewModel DataContext
        {
            get
            {
                return view.DataContext as NewWorkflowTabViewModel;
            }

            set
            {
                view.DataContext = value;
            }
        }

        public AddChildWorkflowChildWindow()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Handles the Click event of the validateButton control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void validateButton_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
            Close();
        }

        /// <summary>
        /// Handles the Click event of the cancelButton control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void cancelButton_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
            Close();
        }

        /// <summary>
        /// Handles the KeyUp event of the RadWindow control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.Input.KeyEventArgs"/> instance containing the event data.</param>
        private void RadWindow_KeyUp(object sender, KeyEventArgs e)
        {
            DialogResult = false;
            Close();
        }
    }
}
